
from sqlobject import *
import sys, os
import time
from database import *

db_filename = os.path.abspath('db/atasko2.sqlite')
print db_filename

connection_string = 'sqlite:' + db_filename + "?debug=true"
connection = connectionForURI(connection_string)
sqlhub.processConnection = connection

Person.createTable()
Person(alias='alfem',name='Alfonso de Cala',email='alfonso.cala@juntadeandalucia.es',myself=True)
Person(alias='luis',name='Luis Rivas',email='luis.rivas.vano.ext@juntadeandalucia.es')
Person(alias='kike',name='Enrique Jimenez',email='enrique.jimenez.ext@juntadeandalucia.es')

p=Person.byAlias('alfem')
now = time.localtime()

Task.createTable()
Task(creator_id=p.id,worker_id=p.id,title='Tarea de prueba')
